package net.tavion.angelboot.common.annotation;

import net.tavion.angelboot.common.enums.RedisType;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * @author : Rui
 * @date : 2019/5/5 16:35
 **/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface RedisCacheable {

    String key() default "";

    RedisType redisType() default RedisType.OBJECT;

    int cacheTime() default 12;

    TimeUnit timeUnit() default TimeUnit.HOURS;
}
